package com.bor.gb.db.domain;

import org.springframework.data.mongodb.core.mapping.Document;

import javax.annotation.Nullable;
import java.util.Set;

/**
 * Created by bor on 11/1/14.
 */
@Document
public class PlaceNote {

    private String title;

    private String description;

    private String content;

    private int order;

    private Set pictures;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public Set getPictures() {
        return pictures;
    }

    public void setPictures(Set pictures) {
        this.pictures = pictures;
    }

    @Override
    public boolean equals(@Nullable Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PlaceNote placeNote = (PlaceNote) o;

        if (title != null ? !title.equals(placeNote.title) : placeNote.title != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return title != null ? title.hashCode() : 0;
    }
}
